Skip to content

[#273] Backfill genre and language for E2E storylines 34-42#553

Merged
realproject7 merged 2 commits intomainfrom
task/551-genre-language-backfill
Mar 26, 2026
Merged

[#273] Backfill genre and language for E2E storylines 34-42#553
realproject7 merged 2 commits intomainfrom
task/551-genre-language-backfill

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

Fixes #273

Adds migration 00026_backfill_e2e_genre_language.sql to set genre and language for the 9 E2E storylines (IDs 34-42) created via Foundry scripts. These had no genre (showing "Uncategorized") and defaulted to English regardless of actual language.

Genre/language mapping derived from E2E script comments (CreateStorylines.s.sol):

ID Title Genre Language
34 The Last Signal Science Fiction English
35 The Holloway Manuscript Mystery English
36 The Ember Throne Fantasy English
37 Still Life with Shadows Contemporary Lit English
38 붉은 달의 아이 Horror Korean
39 風鈴の夏 Contemporary Lit Japanese
40 碧血剑影 Historical Fiction Chinese
41 El Jardín de las Mariposas Eternas Fantasy Spanish
42 L'Heure Bleue Contemporary Lit French

All genre values match lib/genres.ts GENRES exactly (case-sensitive). All language values match LANGUAGES exactly.

Test plan

  • Run migration on staging DB
  • Verify storylines 34-42 show correct genre/language on plotlink.xyz
  • Verify language filter includes Korean, Japanese, Chinese, Spanish, French entries

🤖 Generated with Claude Code

Map each storyline to the correct genre from lib/genres.ts and
language from the E2E script metadata. Fixes "Uncategorized" display
and broken language filter for Foundry-created storylines.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Mar 26, 2026 7:58am

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Verified all genre values against lib/genres.ts GENRES list and all language values against LANGUAGES list — all match exactly (case-sensitive). Genre mappings are reasonable approximations where exact subgenres (Wuxia, Magical Realism, Slice of Life, etc.) aren't in the list. Migration is clean — simple UPDATE statements targeting IDs 34-42 as specified.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES

Summary

The migration does not match issue #551 yet. The updates are missing the ticketed v4b contract-address guard, and storyline 41 is backfilled to the wrong genre.

Findings

  • [high] Issue #551’s required SQL scopes every UPDATE to the v4b factory address 0x9D2AE1E99D0A6300bfcCF41A82260374e38744Cf, but this migration updates rows by storyline_id only. If the same IDs exist on any other contract, this will overwrite unrelated rows.
    • File: supabase/migrations/00026_backfill_e2e_genre_language.sql:9
    • Suggestion: Add AND lower(contract_address) = lower('0x9D2AE1E99D0A6300bfcCF41A82260374e38744Cf') to each UPDATE, matching issue #551.
  • [high] Storyline 41 is set to Fantasy, but issue #551’s required mapping is Others. As written, the migration will still leave that storyline with the wrong genre after deploy.
    • File: supabase/migrations/00026_backfill_e2e_genre_language.sql:30
    • Suggestion: Change storyline 41’s genre to Others.

Decision

Request changes until the migration matches the issue #551 SQL exactly.

Address T2a review:
- Scope all UPDATEs to v4b factory (0x9D2AE1E9...) to prevent
  overwriting rows from other contracts
- Change storyline 41 genre from 'Fantasy' to 'Others' per ticket

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

The migration now matches the Batch 21 backfill scope: each storyline update is scoped to the v4b factory address, and storyline 41 uses the ticketed Others genre.

Findings

  • None.

Decision

Approve. The remaining SQL is consistent with issue #551 and addresses the previously requested fixes.

@realproject7 realproject7 merged commit 28e2c4c into main Mar 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants